#include<gtest/gtest.h>
#include<string>
#include<iostream>
#include<unordered_map>

class Mytest:public testing::Test{
    public:
    static void SetUpTestCase()
    {
        std::cout<<"全局的数据初始化!"<<std::endl;
    }
    void SetUp()
    {
        _map.insert(std::make_pair("appple","苹果"));
        _map.insert(std::make_pair("bye","拜拜"));
        std::cout<<"每个测试套件都需要的数据，初始化！"<<std::endl;
    }
    void TearDown()
    {
        std::cout<<"每个测试套件的清理!"<<std::endl;
    }
    static void TearDownTestCase()
    {
        std::cout<<"全局的数据清理!"<<std::endl;
    }
    public:
    std::unordered_map<std::string,std::string> _map;
};

TEST_F(Mytest,test1)
{
    _map.insert(std::make_pair("appple","苹果"));
    _map.insert(std::make_pair("bye","拜拜"));
    std::cout<<"测试用例1"<<std::endl;
}

TEST_F(Mytest,test2)
{
    ASSERT_EQ(_map.size(),2);
}

int main(int argc,char*argv[])
{
    testing::InitGoogleTest(&argc,argv);
    RUN_ALL_TESTS();
    return 0;
}
